package cn.com.self.apis.member.controller;

import cn.com.self.apis.core.vo.ResultModel;
import cn.com.self.apis.member.entity.UReportInfo;
import cn.com.self.apis.member.entity.UserAndAccountInfo;
import cn.com.self.apis.member.entity.UserAndAccountParam;
import cn.com.self.apis.member.service.UserAndAccountService;
import cn.com.self.apis.portal.util.ICustomPage;
import cn.com.selfsoft.smartcity.commons.http.DataPage;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author hongjuzhu
 * @date 2021/6/20
 * @Description
 */
@Controller
@RequestMapping("/user/account")
@Api(tags = "会员账号管理")
public class UserAccountController {

    @Autowired
    private UserAndAccountService userAndAccountService;

    /**分页获取会员账户列表
     * @Description //TODO
     * @return
     **/
    @ApiOperation(value = "分页获取会员账户列表")
    @RequestMapping(value = "/page", method = RequestMethod.GET)
    @ResponseBody
        public ResponseEntity getAccountContrfoPage(UserAndAccountParam param){
        ICustomPage<UserAndAccountInfo> pageData = userAndAccountService.getAccountContrfoPage(param);
        return ResponseEntity.status(HttpStatus.OK).body(new ResultModel<>(pageData));
    }

}
